<!-- inc:head -->
<div class="notice">
<table cellpadding="1" cellspacing="1">
<tr>
	<td>&raquo; 产品管理</td>
	<td><input type="button" value="添加新内容" onclick="tourl('admin.php?file=product&act=add')"></td>
	<form method="post" action="admin.php?file=product&act=list">
	<td>&nbsp;&raquo; 搜索：</td>
	<td>
		<select name="cateid" id="cateid">
		<option value="0">全部分类</option>
		<!-- $catelist AS $key=>$value -->
		<option value="{:$value[id]}"{if($value[id] == $cateid)} selected{end}>{:$value[space]}{:$value[catename]}</option>
		<!-- end -->
		</select>
	</td>
	<td><input type="text" name="keywords" id="keywords" value="{:$keywords}" /></td>
	<td><input type="submit" value="搜索"></td>
	</form>
</tr>
</table>
</div>

<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
	<td width='3%' class="t_sub">&nbsp;</td>
	<td width='8%' class="t_sub">ID</td>
	<td width="12%" class="t_sub">分类</td>
	<td class="t_sub">主题</td>
	<td width="10%" class="t_sub">价格</td>
	<td width="9%" class="t_sub">发布时间</td>
	<td width="13%" class="t_sub">操作</td>
</tr>
<!-- $msglist AS $key=>$value -->
<tr class="tr_out" onMouseOver="this.className='tr_over'" onMouseOut="this.className='tr_out'">
	<td height='28px' align='center' class="tc_left"><input type="checkbox" name="idin[]" value="{:$value[id]}"></td>
	<td height='28px' align='center' class="tc_right">{:$value[id]}</td>
	<td align='center' class="tc_right">{:$value[catename]}</td>
	<td align='left' class="tc_right">&nbsp;<span style="{:$value[style]}">{:$value[subject]}</span><!-- if(!$value[ifcheck]) --> <span style="color:red;">(未审核)</span><!-- end --><!-- if($value[thumb]) --> <a href="{:$value[thumb]}" target="_blank" title="点击查看"><img src="images/thumb.gif" border="0" align="absmiddle"></a><!-- end -->&nbsp;<!-- if($value[istop]) --><span style="color:#000080;">[顶]</span><!-- end --><!-- if($value[isvouch]) --><span style="color:blue;">[荐]</span><!-- end --><!-- if($value[isbest]) --><span style="color:red;">[精]</span><!-- end --></td>
	<td align='center' class="tc_right">{:$value[s_price]}</td>
	<td align='center' class="tc_right">{:date('Y-m-d',$value[postdate])}</td>
	<td align='center' class="tc_right">
		<input type="button" value="编辑" onclick="to_modify({:$value[id]})">
		<input type="button" value="删除" onclick="to_delete({:$value[id]});">
	</td>
</tr>
<!-- end -->
</table>

<div class="table">
<input type="button" value="全选" onclick="select_all()">
<input type="button" value="反选" onclick="select_anti()">
<input type="button" value="全不选" onclick="select_none()">
<input type="button" value="排序提前" onclick="qg_pl('taxis')">
<input type="button" value="置顶" onclick="qg_pl('top')">
<input type="button" value="推荐" onclick="qg_pl('vouch')">
<input type="button" value="精华" onclick="qg_pl('best')">
<input type="button" value="审核" onclick="qg_pl('check')">
<input type="button" value="取消置顶" onclick="qg_pl('dtop')">
<input type="button" value="取消推荐" onclick="qg_pl('dvouch')">
<input type="button" value="取消精华" onclick="qg_pl('dbest')">
<input type="button" value="取消审核" onclick="qg_pl('dcheck')">
<input type="button" value="批量删除" onclick="qg_pl('delete')">
</div>

<script type="text/javascript">
function to_modify(id)
{
	tourl("admin.php?file=product&act=modify&id="+id);
}
function to_delete(id)
{
	var question = confirm("确认删除该内容信息吗？特别说明，删除后无法恢复！");
	if (question != "0")
	{
		tourl("admin.php?file=product&act=delete&id="+id);
	}
}
function qg_pl(qgtype)
{
	var idarray = new Array();//定义一个数组
	var cv = document.getElementsByTagName("input");
	var m = 0;
	for(var i=0; i<cv.length; i++)
	{
		if(cv[i].type.toLowerCase() == "checkbox")
		{
			if(cv[i].checked)
			{
				idarray[m] = cv[i].value;
				m++;
			}
		}
	}
	var id = idarray.join(",");
	if(!id || id == "0")
	{
		alert("没有勾选要操作的主题！");
		return false;
	}
	var url = "admin.php?file=product&act=plset&idlist="+id+"&qgtype="+qgtype;
	if(qgtype == "delete")
	{
		question = confirm("确认删除该信息吗？特别说明，删除后无法恢复！");
		if (question != "0")
		{
			tourl(url);
		}
	}
	else
	{
		tourl(url);
	}
}
</script>

<div align="right">{:$pagelist}</div>
<!-- inc:foot -->